<template>
  <van-swipe :autoplay="3000">
    <van-swipe-item v-for="(image, index) in zhuangxiuImg" :key="index">
      <img v-lazy="image" />
    </van-swipe-item>
  </van-swipe>
</template>
<script>
import axios from "axios";
export default {
  name: "zhuangbanner",
  data() {
    return {
      zhuangxiuImg: [],
    };
  },
  created() {
    axios({
      url: "http://localhost:3000/zhuangxiuImg",
    }).then((res) => {
      console.log(this.data);
      console.log(this.zhuangxiuImg);
      this.zhuangxiuImg = res.data;
      console.log(this.zhuangxiuImg);
    });
  },
};
</script>
<style>
img {
  width: 100%;
}
</style>